<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>StellarDrift - 登录注册页原型</title>
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500&display=swap');

        :root {
            --phone-width: 430px;
            --phone-height: 932px;
            --primary-bg: #0D1B2A;
            --secondary-bg: #1B263B;
            --lighter-bg: #415A77;
            --accent-gold: #FFD700;
            --text-light: #E0E1DD;
            --text-dark: #778DA9;
            --wechat-green: #07C160;
        }

        body {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
            background-color: #f0f2f5;
            font-family: 'Noto Sans SC', sans-serif;
            overflow: hidden;
        }

        .phone-shell {
            width: var(--phone-width);
            height: var(--phone-height);
            background-color: #111;
            border-radius: 50px;
            padding: 12px;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 0 10px #000;
            position: relative;
        }

        .screen {
            width: 100%;
            height: 100%;
            background: linear-gradient(180deg, var(--primary-bg) 0%, var(--secondary-bg) 100%);
            border-radius: 40px;
            position: relative;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 20px;
            box-sizing: border-box;
        }

        /* Mockup Elements */
        .notch {
            position: absolute;
            top: 12px;
            left: 50%;
            transform: translateX(-50%);
            width: 140px;
            height: 35px;
            background-color: #111;
            border-radius: 0 0 20px 20px;
            z-index: 100;
        }
        .home-indicator {
            position: absolute;
            bottom: 10px;
            left: 50%;
            transform: translateX(-50%);
            width: 140px;
            height: 5px;
            background-color: rgba(255, 255, 255, 0.4);
            border-radius: 5px;
            z-index: 100;
        }
        
        .login-container {
            width: 100%;
            max-width: 350px;
            display: flex;
            flex-direction: column;
            align-items: center;
            color: var(--text-light);
            animation: fade-in 0.6s ease-out;
        }

        @keyframes fade-in {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .slogan {
            font-size: 18px;
            color: var(--text-dark);
            margin-bottom: 60px;
        }
        .slogan::before {
            content: '漂流瓶';
            display: block;
            font-size: 32px;
            font-weight: 500;
            color: var(--text-light);
            margin-bottom: 10px;
        }
        
        .input-group {
            width: 100%;
            margin-bottom: 20px;
            position: relative;
        }
        .form-input {
            width: 100%;
            padding: 15px;
            background-color: rgba(255,255,255,0.1);
            border: 1px solid var(--text-dark);
            border-radius: 10px;
            color: var(--text-light);
            font-size: 16px;
            box-sizing: border-box;
            transition: border-color 0.3s ease;
        }
        .form-input:focus {
            outline: none;
            border-color: var(--accent-gold);
        }

        .get-code-btn {
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            color: var(--accent-gold);
            cursor: pointer;
            font-size: 14px;
        }
        .get-code-btn:disabled {
            color: var(--text-dark);
            cursor: not-allowed;
        }
        
        .login-button {
            width: 100%;
            padding: 15px;
            background-color: var(--accent-gold);
            border: none;
            border-radius: 10px;
            color: var(--primary-bg);
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        .login-button:disabled {
            background-color: var(--text-dark);
            cursor: not-allowed;
        }
        .login-button:not(:disabled):active {
            transform: scale(0.98);
        }

        .divider {
            display: flex;
            align-items: center;
            text-align: center;
            color: var(--text-dark);
            width: 100%;
            margin: 40px 0;
        }
        .divider::before, .divider::after {
            content: '';
            flex: 1;
            border-bottom: 1px solid var(--text-dark);
        }
        .divider:not(:empty)::before { margin-right: .5em; }
        .divider:not(:empty)::after { margin-left: .5em; }
        
        .wechat-button {
            width: 100%;
            padding: 15px;
            background-color: var(--wechat-green);
            border: none;
            border-radius: 10px;
            color: white;
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
        }

    </style>
</head>
<body>

    <div class="phone-shell">
        <div class="screen">
            <div class="notch"></div>
            
            <div class="login-container">
                <div class="slogan">致未来的你，或陌生的灵魂</div>

                <div class="input-group">
                    <input type="text" class="form-input" id="accountInput" placeholder="手机号 / 邮箱">
                </div>
                <div class="input-group">
                    <input type="text" class="form-input" id="codeInput" placeholder="验证码">
                    <button class="get-code-btn" id="getCodeBtn">获取验证码</button>
                </div>

                <button class="login-button" id="loginBtn" disabled>登录 / 注册</button>
                
                <div class="divider">或</div>

                <button class="wechat-button" id="wechatBtn">微信一键登录</button>
            </div>

            <div class="home-indicator"></div>
        </div>
    </div>

<script>
document.addEventListener('DOMContentLoaded', function() {
    const accountInput = document.getElementById('accountInput');
    const codeInput = document.getElementById('codeInput');
    const getCodeBtn = document.getElementById('getCodeBtn');
    const loginBtn = document.getElementById('loginBtn');
    const wechatBtn = document.getElementById('wechatBtn');

    function validateForm() {
        const isAccountValid = accountInput.value.trim().length > 0; // Simple validation
        const isCodeValid = codeInput.value.trim().length >= 4;
        loginBtn.disabled = !(isAccountValid && isCodeValid);
    }

    accountInput.addEventListener('input', validateForm);
    codeInput.addEventListener('input', validateForm);

    getCodeBtn.addEventListener('click', () => {
        if (accountInput.value.trim().length === 0) {
            alert('请输入手机号或邮箱');
            return;
        }

        getCodeBtn.disabled = true;
        let countdown = 60;
        getCodeBtn.textContent = `${countdown}s`;

        const interval = setInterval(() => {
            countdown--;
            if (countdown > 0) {
                getCodeBtn.textContent = `${countdown}s`;
            } else {
                clearInterval(interval);
                getCodeBtn.textContent = '获取验证码';
                getCodeBtn.disabled = false;
            }
        }, 1000);
    });
    
    loginBtn.addEventListener('click', () => {
        alert('登录成功！正在跳转到心声海洋...');
        setTimeout(() => {
            window.location.href = 'HomePage.html';
        }, 1500);
    });

    wechatBtn.addEventListener('click', () => {
        alert('正在拉起微信授权...');
        setTimeout(() => {
            alert('微信授权成功！正在跳转到心声海洋...');
            window.location.href = 'HomePage.html';
        }, 2000);
    });

});
</script>

</body>
</html> 